package com.rede.didiok.admin;

import java.util.TimeZone;

import javax.annotation.PostConstruct;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.oas.annotations.EnableOpenApi;

@EnableTransactionManagement
@SpringBootApplication
@EnableOpenApi
@EnableDiscoveryClient
@EnableCaching
@EnableRabbit
@EnableFeignClients(basePackages = {"com.rede.didiok.common.feign"})
@ComponentScan(basePackages = {
//        "com.plumelog",
		"com.rede.didiok.common.config",
        "com.rede.didiok.common.fallback",
		"com.rede.didiok.common.annotion",
		"com.rede.didiok.common.utils",
		"com.rede.didiok.admin",
//		"com.moxi.mogublog.xo.manager",
//		"com.moxi.mogublog.xo.executor",
//		"com.moxi.mogublog.xo.utils",
//		"com.moxi.mogublog.xo.service",
//		"com.meetc.mogublog.security.**",
})
public class DidiokAdminApplication {


	public static void main(String[] args) {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
		SpringApplication.run(DidiokAdminApplication.class, args);
	}

	/**
	 * 设置时区
	 */
	@PostConstruct
	void setDefaultTimezone() {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
	}

}
